package com.kgc.book.bookservice.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kgc.book.bookservice.mapper.BookmanagerMapper;
import com.kgc.book.entity.Bookmanager;
import com.kgc.book.service.BookmanagerService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.function.Function;


/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author CQW
 * @since 2020-10-03
 */
@Service
@Component
public class BookmanagerServiceImpl implements BookmanagerService {
    @Resource
    BookmanagerMapper bookmanagerMapper;

    @Override
    public List<Bookmanager> selectAllBook() {
        List<Bookmanager> bookmanagers = bookmanagerMapper.selectList(null);
        return bookmanagers;
    }

    @Override
    public Integer delBook(int bId) {
        int i = bookmanagerMapper.deleteById(bId);
        return i;
    }

    @Override
    public int saveBook(Bookmanager bookmanager) {
        int insert = bookmanagerMapper.insert(bookmanager);
        return insert;
    }

    @Override
    public boolean saveBatch(Collection<Bookmanager> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean saveOrUpdateBatch(Collection<Bookmanager> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean updateBatchById(Collection<Bookmanager> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean saveOrUpdate(Bookmanager entity) {
        return false;
    }

    @Override
    public Bookmanager getOne(Wrapper<Bookmanager> queryWrapper, boolean throwEx) {
        return null;
    }

    @Override
    public Map<String, Object> getMap(Wrapper<Bookmanager> queryWrapper) {
        return null;
    }

    @Override
    public <V> V getObj(Wrapper<Bookmanager> queryWrapper, Function<? super Object, V> mapper) {
        return null;
    }

    @Override
    public BaseMapper<Bookmanager> getBaseMapper() {
        return null;
    }
}
